/**
 * Matrix4.java
 * 
 * @date: 2012-02-28
 * @author: Xiaoyu Guo (MUN# 200982155)
 * This file is part of the course project for COMP 6752, 
 * Application of Computer Graphics. All the file is written
 * by myself.
 */
package mun.cs6752.project.model;

/** Defines a 4x4 matrix.
 * 4x4 matrices are commonly used in 3D (homogeneous coordinate) transformations.
 * @author Xiaoyu Guo
 */
public class Matrix4 extends Matrix {
    private static final int SIZE = 4;
    
    /**
     * @param source
     */
    public Matrix4(double[][] source) {
        super(source);
        
        if(this.width != SIZE || this.height != SIZE){
            throw new IllegalArgumentException("Illegal construction data for 4x4 matrix");
        }
    }

    public Matrix4(){
        super(SIZE, SIZE);
    }
    
    public Vector4 multiply(Vector4 value){
        Vector result = super.multiply(value);
        return new Vector4(result);
    }
}
